package com.want.model.dto;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Objects;

/**
 * @author WangZhiJian
 * @since 2021/11/21
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Result<T> {
    private String msg;

    private Integer code;

    private T data;

    public boolean success(){
        return Objects.equals(code,200);
    }
}
